1. Field of the Invention
The present invention relates to a pixel interpolation method and a pixel interpolation circuit for performing an interpolation process between pixels. More particularly, the invention relates to a pixel interpolation method and a pixel interpolation circuit performing interpolation between pixels for a signal output from a CCD (Charge Coupled Device) image pick-up device employing a primary color filter.
2. Description of the Related Art
A CCD employing a primary color filter has been used for an image pick-up device, particularly for a digital camera, a digital vide camera. In general, a digital data obtained by an A/D conversion of an analog signal output from the CCD is called as a row data. In case of the CCD with the primary color filter, the row data corresponding to each pixel in one-to-one basis only contains any one of R (Red; hereinafter represented by xe2x80x9cRxe2x80x9d), G (Green: hereinafter represented by xe2x80x9cGxe2x80x9d) and B (hereinafter represented by xe2x80x9cBxe2x80x9d) depending upon an array of a primary color filter arranged on a CCD photosensing surface per pixel.
A pixel interpolation circuit performs a pixel interpolation process for increasing resolution. In the pixel interpolation process, a color data other than primary color provided by the filter corresponding to each pixel is generated from row data of adjacent pixels. It is typical that the row data is generated by A/D conversion of the analog signal output from the CCD and written in a memory.
Hereinafter, discussion will be given for the conventional pixel interpolation process. The conventional pixel interpolation circuit performs interpolation between the pixels as shown in FIG. 13. As shown in FIG. 13, a color data of three primary color (R, G, B) of the pixel in question (hereinafter referred to as xe2x80x9ctarget pixelxe2x80x9d) is obtained by arithmetic operation with reference to color information of the pixels located adjacent to the target pixel. For instance, taking the pixel labeled xe2x80x9cB1xe2x80x9d in FIG. 13 as the target pixel, the color data R0 and G0 other than B in the target pixel can be obtained through arithmetic operation in the following matter on the basis of row data of the pixels located adjacent to the target pixel. Namely,
R0=(R1+R2+R3+R4)/4
xe2x80x83G0=(G1+G2+G3+G4)/4
B0=B (as is)xe2x80x83xe2x80x83(1)
Conventionally, the foregoing pixel interpolation process has been performed.
When calculation of the foregoing equation (1) is performed, color data at nine positions are made reference to. In practice, reading out of row data from the memory has to be performed nine times. Therefore, number of the color data to be made reference to is large to lower process speed. On the other hand, since an adder circuit is required for summing four values, scale of the circuit becomes large.
A solid state image pick-up device disclosed in Japanese Unexamined Patent Publication No. Heisei 9-182090 concerns improvement in sensitivity but does not provide any solution for the problem in the prior art set forth above.
It is therefore an object of the present invention to provide a pixel interpolation method and a pixel interpolation circuit which can optimize processing in the pixel interpolation circuit and thus can permit down-sizing of a scale of the circuit and improvement of a process speed.
According to the first aspect of the present invention, a pixel interpolation method taking a pixel at a center of three rowxc3x97three column image data as a target pixel subjecting interpolation process, calculating color data of the target pixel and color data of pixels around the target pixel and adjacent thereto for outputting an interpolated color data for the target pixel, comprises:
a reading step of reading out image data of sequential first to third rows among image data of N rowsxc3x97M columns written in a memory, per each column, wherein N and M are integer at least equal to three; and
a color data determining step of determining the interpolated color data for the target pixel on the basis of a first color data as one of color data for three pixels of the column read out immediately before color data of the target pixel, second and third color data for two other pixels simultaneously read out with the target pixel, and a fourth color data as one of color data for three pixels of the column read out immediately after color data of the target pixel data.
Then, the color data determining step may take data of the target pixel as the first color data, an average value of the first color data and the fourth color data as the third color data, and an average value of the second color data and the third color data as the second color data when the target pixel is the first color data among three primary colors.
On the other hand, the color data determining step may take data of the target pixel as the second color data, an average value of the first color data and the fourth color data as the first color data, and an average value of the second color data and the third color data as the third color data when the target pixel is the second color data among three primary colors.
Also, the color data determining step may take data of the target pixel as the third color data, an average value of the first color data and the fourth color data as the first color data, and an average value of the second color data and the third color data as the second color data when the target pixel is the third color data among three primary colors.
According to the second aspect of the present invention, a pixel interpolation circuit taking a pixel at a center of three rowxc3x97three column image data as a target pixel subjecting interpolation process, calculating color data of the target pixel and color data of pixels around the target pixel and adjacent thereto for outputting an interpolated color data for the target pixel, comprises:
reading means for reading out image data of sequential first to third rows among image data of N rowsxc3x97M columns written in a memory, per each column, wherein N and M are integer at least equal to three; and
color data determining means for determining the interpolated color data for the target pixel on the basis of a first color data as one of color data for three pixels of the column read out immediately before color data of the target pixel, second and third color data for two other pixels simultaneously read out with the target pixel, and a fourth color data as one of color data for three pixels of the column read out immediately after color data of the target pixel data.
The color data determining means may include means for deriving an average value of the first color data and the fourth color data and means for deriving an average value of the second color data and the third color data, and take data of the target pixel as the first color data, an average value of the first color data and the fourth color data as the third color data, and an average value of the second color data and the third color data as the second color data when the target pixel is the first color data among three primary colors.
On the other hand, the color data determining means may include means for deriving an average value of the first color data and the fourth color data and means for deriving an average value of the second color data and the third color data, and take data of the target pixel as the second color data, an average value of the first color data and the fourth color data as the first color data, and an average value of the second color data and the third color data as the third color data when the target pixel is the second color data among three primary colors.
Also, the color data determining means may include means for deriving an average value of the first color data and the fourth color data and means for deriving an average value of the second color data and the third color data, and take data of the target pixel as the third color data, an average value of the first color data and the fourth color data as the first color data, and an average value of the second color data and the third color data as the second color data when the target pixel is the third color data among three primary colors.
In short, according to the present invention, among pixels located around and adjacent to a target pixel at the center of a three rowxc3x97three column image data, number of pixels made reference to becomes smaller than that in the prior art. Then, by improving construction of the memory, down-sizing of the circuit scale and speeding up of reading out of data can be achieved.
Namely, in a pixel signal generating circuit of a CCD with a primary color filter, down-sizing of the circuit scale and speeding up of reading out of data can be achieved by optimization of the pixel interpolation circuit. Also, since the memory is provided a construction, in which a digital data derived through A/D conversion of an analog signal output from the CCD can be read out in parallel, process speed can be improved.